#include <iostream>

void func()
{
    std::cout << "void func()" << std::endl;
    std::cout << "This is no-argument function" << std::endl;
}

void func(int a)
{
    std::cout << "void func(int a)" << std::endl;
    std::cout << "a = " << a << std::endl;
}

// void func(int a, int b)
// {
//     std::cout << "void func(int a, int b)" << std::endl;
//     std::cout << "a = " << a << std::endl;
//     std::cout << "b = " << b << std::endl;
// }

void func(int a, double b)
{
    std::cout << "void func(int a, double b)" << std::endl;
    std::cout << "a = " << a << std::endl;
    std::cout << "b = " << b << std::endl;
}

void func(double a, int b)
{
    std::cout << "void func(double a, int b)" << std::endl;
    std::cout << "a = " << a << std::endl;
    std::cout << "b = " << b << std::endl;
}

// void func(double a, int)
// {
//     std::cout << "void func(double a, int)" << std::endl;
//     std::cout << "a = " << a << std::endl;
// }

void func(int, int)
{
    std::cout << "void func(int, int)" << std::endl;
    std::cout << "No real arguments, all are placement" << std::endl;
}

int main(int argc, char const *argv[])
{
    int a = 10;
    int b = 20;
    double c = 100.0;

    std::cout << "a = " << a << std::endl;
    std::cout << "b = " << b << std::endl;
    std::cout << "c = " << c << std::endl;

    func();
    func(a);
    func(a, b);
    func(a, c);
    func(c, a);

    return 0;
}

/*

    总结：
        只要没有二义性就可以重载，不会报错
*/